home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / skunk10 < prev    next >
Internet Message Format  |  1995-03-31  |  29KB

  1. Path: seq!spell
  2. From: DOUG CANNON <dougc@bert.cs.byu.edu>
  3. Subject:  v01i012:  skunk10 - Skunk v1.0: An animated game of dice skill, Part01/01
  4. Newsgroups: comp.sources.hp48
  5. Followup-To: comp.sys.hp48
  6. Approved: spell@seq.uncwil.edu
  7.  
  8. Checksum: 4247296838 (verify with brik -cv)
  9.  
  10. Submitted-by: DOUG CANNON <dougc@bert.cs.byu.edu>
  11. Posting-number: Volume 1, Issue 12
  12. Archive-name: skunk10/part01
  13.  
  14.  
  15. BEGIN_DOC skunk.doc
  16.  
  17. Description:    SKUNK is a 2 dice game of part strategy, part luck.
  18.         This game was written entirely in RPL code
  19.         and is loaded with great graphics and animation.
  20.         SKUNK may be played with one player and HP as
  21.         the opponent, or with two human players.
  22.  
  23. About me:    SKUNK was written by Douglas R. Cannon.  I am currently
  24.         an electrical engineering student at Brigham Young
  25.         University in Provo, Utah.  As I am now on summer
  26.         vacation, I have had time for such frivolity. Fall
  27.         semester begins on Sept 4th and my HP48 fun will
  28.         abruptly end.
  29.  
  30.         Douglas R. Cannon
  31.         178 Wymount #4A
  32.         Provo, UT 84604
  33.         (801) 371-2632
  34.         dougc@bert.cs.byu.edu
  35.  
  36. ----------------
  37.    A long time ago I learned the game of Skunk.  I am unaware of the author
  38. of the original idea for the game, I think it (the game) is ancient.  I
  39. first wrote this for the HP28s, but have not yet worked it to the point
  40. of being posted.  Instead, I have been spending my time re-writing it for
  41. the HP48s.  I finished the program today, August 7, 1991.
  42.    The game is simple.  SKUNK will first give you an options menu:
  43.  
  44. 1) HP as player #1
  45. 2) HP as player #2
  46. 3) Two players
  47.  
  48. Only two players can play at one time, and HP will be one of those players
  49. if you so desire.  Playing with two people gets boring fast, but the option
  50. is available.  Choose an option by pressing 1, 2, or 3.  If you choose HP
  51. to be one of the players, then you are given a Skill level menu:
  52.  
  53. 1) Terribly easy
  54. 2) Average
  55. 3) Challenging
  56.  
  57. The strategies are as follows: The easy strategy will always roll the dice
  58. 5 times before passing. The average strategy will always roll the dice 3
  59. times before passing. Surprisingly enough, this is a good strategy. (See
  60. the RDME section as to why I think so.) and, the Challenging strategy
  61. would be less challenging if I told you what it is. If you can beat this
  62. strategy 6 times out of 10 with a destination score of 200, then I
  63. applaud you.
  64.  
  65. After choosing a strategy, or if you choose two human players, then you are
  66. given a destination score menu:
  67.  
  68. 1) 100 points
  69. 2) 200 points
  70. 3) 300 points
  71.  
  72. This is self-explanitory. Obviously, the winner is the one who gains or
  73. passes this score.
  74.  
  75.    At this point you begin play.  Player #1 rolls first, and his options are
  76. to Roll or Pass. By pressing the A key, the dice are rolled, and by pressing
  77. the F key you may pass.  Skunk is played with two dice.  The object is to
  78. roll as many times as you can without getting "Skunked".  One is "Skunked"
  79. when a one is rolled on either die.  If no ones are rolled, then the sum of
  80. the two dice is added to the pot. If you are "Skunked" then you lose your
  81. turn and the pot goes to zero.  If you choose to pass at some time, then the
  82. current pot is added to your score.  The pot then returns to zero, and the
  83. play passes to the next player.
  84.    It is extremely disastrous to be "Double Skunked".  This is, of course,
  85. when a one is rolled on each die.  At this point, the pot goes to zero, your
  86. score goes to zero, and you lose your turn.  This is most undesireable.
  87.    Now, it is only fair that everyone get the same amount of turns, so if
  88. player #1 should reach or pass the destination score, then player #2 has one
  89. more turn to pass the score of player #1.  Thus, if both players reach the
  90. destination score, the winner is the player with the highest score.  You can
  91. see the advantages to being player #2.  If player #2 reaches the destination
  92. score, and player #1 has not yet reached it, player #2 wins immeadiately.
  93. If both players reach the destination score and are tied, then it will go
  94. into overtime until one player is >= the destination and > the other player's
  95. score.
  96.  
  97.    This is all you should need to know to play the game! I hope everyone enjoys
  98. this game!  I cannot compete with those who program the schip stuff, and have
  99. not tried this method as of yet.  My main goal of writing this game was to
  100. create some software that has nice animation, is fun, and is written completely
  101. in RPL code.
  102.  
  103. ---------------------
  104. To Install:
  105.  
  106. No extra software is needed to install skunk1.0
  107. You will need about 25K free before you download it.  SKUNK only takes
  108. just over 13K when all setup, but downloading, setup, etc. takes some room.
  109. Simply name the file SKUNK, and download it.  There will be a directory
  110. named SKUNK that will be created with all the programs in it.  ( At this
  111. point it may be wise to do a RESET.  Just hold down the ON key and Press the
  112. C key. This makes sure the maximum available memory is actually available.
  113. My HP only had 7K available at this point, and it was enough.
  114. The first program will be called SETUP.  Run this one, and it will set things
  115. up.  ( This takes about 10 seconds ).  Then SKUNK will be the first program
  116. in the directory. Run this one to play the game!
  117.  
  118. BYTES:
  119. Before running SETUP    #4E85h    17579.5
  120. After running SETUP    #6ABFh    13068
  121.  
  122. About the ABOUT:
  123.    You can run the program ABOUT to find out about the author ( that's me )
  124. This software is distributed under the "I don't care ware" system and thus 
  125. you can give it to anybody, use any or all programs and shapes elsewhere,
  126. and even change them if it pleases you.  Just leave the ABOUT program intact,
  127. and I don't care. Otherwise I do care even though I will never know.
  128.  
  129. END_DOC
  130.  
  131. BEGIN_RDME skunk.rdm
  132.  
  133.    Here is a list of all the programs and shapes for anyone who is interested.
  134. Some of these programs (DNUM, NEWS, NANNY) may be useful in other applications.
  135. I have listed each program, it's purpose, and the arguments it needs.
  136.  
  137. Programs in order of appearance:
  138. --------------------------------
  139.  
  140. SKUNK    Run This. It starts the game        ( no arguments )
  141. ABOUT    Run This. About the Author        ( no arguments )
  142. SKMAIN    The master control program        3: destination score
  143.                         2: skill level (0 if 2 humans)
  144.                         1: HP player # (3 if 2 humans)
  145. NEWS    prints final score menu            2: message (String)
  146.                         1: coordinates
  147. DNUM    Display a number            2: number
  148.                         1: coordinates
  149. NANNY    The international song of the child    ( no arguments )
  150. Roll    Roll dice                ( no arguments )
  151.                     exit:    2: dice #1
  152.                         1: dice #2
  153. ERNUM    Erase a 25 by 8 spot ( a number )    1: 1, 2, or 3
  154. TURN    Allows a human a turn            2: score (size 2 array)
  155.                         1: destination score
  156. HPTURN    Allows HP a turn ( knows 3 strategies )    4: score (size 2 array)
  157.                         3: HP player # (1-2)
  158.                         2: skill level (1-3)
  159.                         1: destination score
  160. QUIT    Do you REALLY want to quit?        ( no arguments )
  161. FANF    The "FANFARE" Somebody has won!        4: destination score
  162.                         3: skill level (0-3)
  163.                         2: HP player # (1-3)
  164.                         1: score (size 2 array)
  165. SK    Someone is SKUNKED!            3: die #1
  166.                         2: die #2
  167.                         1: destination score
  168. DSK    Someone is DOUBLE SKUNKED!!        1: destination score
  169. MYTH    Well, this really is a myth you know    ( no arguments )
  170.  
  171.  
  172. Shapes in order of apearance:
  173. -----------------------------
  174.  
  175. BOARD    GROB 131 64        The playing Board
  176. SKSKP    GROB 71 31        The big SKUNK shape
  177. DICE    A list of 6 GROBs    The dots on the dice
  178. WAVES    A list of 10 GROBs    The wave in the options menu
  179. DOTS    A list of 4 GROBs    The moving dots in the skill menu
  180. BALLS    A list of 10 GROBs    The bouncing balls in the destination menu
  181. DESTIN    A list of 3 GROBs    Shows 100, 200, or 300 destination scores
  182. YOUWON    A list of 13 GROBs    This creates the YOU WON! graphic
  183. HPWON    A list of 13 GROBs    This creates the HP WON! graphic
  184. PLANT    A list of 3 GROBs    The plant
  185. POT    A list of 3 GROBs    The pot
  186. SHAPES    A list of 7 GROBs    Various shapes
  187.  
  188. --------------------------------------------------------------------------
  189.  
  190.    Following is some interesting data I collected while trying to find
  191. three suitable strategies for HP to use.  I originally wrote a SKUNK 
  192. simulation on the HP to test various strategies and find the best one.
  193. It was much to slow, ( It would take almost an hour to simulate 100 games
  194. without the use of graphics ) so I wrote a version in Pascal. On a 386 it
  195. could simulate 20,000 games in under 15 minutes.
  196.    Now, I am not a stats man, but I used this simulator as follows: I would
  197. program a specific strategy, and play it against another. They would play
  198. for 3000 or 5000 games, and whichever strategy won the highest percentage
  199. of games was obviously better. If I played the two against each other again,
  200. they would consistently produce the same percentages. ( As long as the
  201. number of simulated games was high enough.  3000 seemed adequate. )
  202.  
  203.     Strategy #1: Roll once
  204.     Strategy #2: Roll twice
  205.     Strategy #3: Roll three times    ( Used as average skill level )
  206.     Strategy #4: Roll four times
  207.     Strategy #5: Roll five times    ( Uses as terribly easy skill level )
  208.  
  209.     #1: won 35.4% vs. #2: won 64.6%    ( 3000 games )
  210.     #2: won 52.8% vs. #3: won 47.2%    ( 3000 games )
  211.     #2: won 51.8% vs. #3: won 48.2%    ( 20000 game re-match )
  212.     #2: won 60.3% vs. #4: won 39.7%    ( 3000 games )
  213.     #2: won 68.5% vs. #5: won 31.5%    ( 3000 games )
  214.  
  215.     #3: won 66.3% vs. #5: won 33.6%    ( 10000 games )
  216.  
  217.    From this we can see that rolling twice always is the best strategy of
  218. the five listed. Rolling 3 times always is not too bad, and I chose this
  219. as the average strategy. It is above average when compared to these, but
  220. only average when compared to better strategies.
  221.  
  222.     Strategy #19: The Challenging strategy.
  223.  
  224.     #5: won 22.1% vs. #19: won 77.9%
  225.     #3: won 37.1% vs. #19: won 62.9%
  226.  
  227. Not too bad, really.
  228.  
  229. END_RDME
  230.  
  231. BYTES: #4E85h  17579.5
  232.  
  233. BEGIN_RPL skunk
  234. %%HP: T(3)A(R)F(.);
  235. DIR
  236.   SETUP
  237.     \<< CLLCD
  238. "Please wait" 1
  239. DISP
  240. "10 seconds..." 2
  241. DISP BOARD ST\->
  242. 'BOARD' STO SKSHP
  243. ST\-> 'SKSHP' STO
  244. DICE ST\-> 'DICE' STO
  245. WAVES ST\-> 'WAVES'
  246. STO DOTS ST\-> 'DOTS'
  247. STO DESTIN ST\->
  248. 'DESTIN' STO PLANT
  249. ST\-> 'PLANT' STO POT
  250. ST\-> 'POT' STO
  251. SHAPES ST\-> 'SHAPES'
  252. STO { SETUP ST\-> }
  253. PURGE
  254.     \>>
  255.   ST\->
  256.     \<< \-> S
  257.       \<< "" 1 S SIZE
  258.         FOR N S N
  259. GET +
  260.         NEXT STR\->
  261.       \>>
  262.     \>>
  263.   SKUNK
  264.     \<< 0 0 0 0 \-> N
  265. KY HP SK
  266.       \<< BOARD {
  267. # 0h # 0h } { # 82h
  268. # 1Ch } SUB PICT
  269. STO { # 0h # 0h }
  270. PVIEW PICT { # 1Fh
  271. # 1Fh } "OPTIONS:"
  272. 1 \->GROB REPL PICT {
  273. # 1Fh # 26h }
  274. "1) HP AS PLAYER #1"
  275. 1 \->GROB REPL PICT {
  276. # 1Fh # 2Dh }
  277. "2) HP AS PLAYER #2"
  278. 1 \->GROB REPL PICT {
  279. # 1Fh # 34h }
  280. "3) TWO PLAYERS" 1
  281. \->GROB REPL
  282.         DO
  283.           IF KY
  284.           THEN 200
  285. .1 BEEP
  286.           END
  287.           DO 1 'N'
  288. STO+ PICT { # 17h
  289. # 26h } WAVES N GET
  290. REPL N 10
  291.             IF ==
  292.             THEN 0
  293. 'N' STO
  294.             END
  295.           UNTIL KEY
  296.           END 'KY'
  297. STO
  298.         UNTIL KY 82
  299. \>= KY 84 \<= AND
  300.         END KY 81 -
  301. 'HP' STO
  302.         IF KY 84 \=/
  303.         THEN PICT {
  304. # 17h # 1Eh } # 50h
  305. # 1Eh BLANK REPL
  306. PICT { # 1Fh # 1Fh
  307. } "SKILL LEVEL:" 1
  308. \->GROB REPL PICT {
  309. # 1Fh # 26h }
  310. "1) TERRIBLY EASY"
  311. 1 \->GROB REPL PICT {
  312. # 1Fh # 2Dh }
  313. "2) AVERAGE" 1
  314. \->GROB REPL PICT {
  315. # 1Fh # 34h }
  316. "3) CHALLENGING" 1
  317. \->GROB REPL 1 'N'
  318. STO 0 'KY' STO
  319.           DO
  320.             IF KY
  321.             THEN
  322. 200 .1 BEEP
  323.             END
  324.             DO PICT
  325. { # 14h # 26h }
  326. DOTS N GET REPL 1
  327. 'N' STO+ 5 N
  328.               IF ==
  329.               THEN
  330. 1 'N' STO
  331.               END
  332.             UNTIL
  333. KEY
  334.             END
  335. 'KY' STO
  336.           UNTIL KY
  337. 82 \>= KY 84 \<= AND
  338.           END KY 81
  339. - 'SK' STO
  340.         END PICT {
  341. # 14h # 1Eh } # 5Ah
  342. # 1Eh BLANK REPL
  343. PICT { # 1Fh # 1Fh
  344. }
  345. "DESTINATION SCORE:"
  346. 1 \->GROB REPL PICT {
  347. # 1Fh # 26h }
  348. "1) 100 POINTS" 1
  349. \->GROB REPL PICT {
  350. # 1Fh # 2Dh }
  351. "2) 200 POINTS" 1
  352. \->GROB REPL PICT {
  353. # 1Fh # 34h }
  354. "3) 300 POINTS" 1
  355. \->GROB REPL 1 'N'
  356. STO 0 'KY' STO
  357.         DO
  358.           IF KY
  359.           THEN 200
  360. .1 BEEP
  361.           END
  362.           DO PICT {
  363. # 16h # 26h } BALLS
  364. N GET REPL 'N' 1
  365. STO+ N 11
  366.             IF ==
  367.             THEN 1
  368. 'N' STO
  369.             END
  370.           UNTIL KEY
  371.           END 'KY'
  372. STO
  373.         UNTIL KY 82
  374. \>= KY 84 \<= AND
  375.         END KY 81 -
  376. 100 * SK HP SKMAIN
  377.       \>>
  378.     \>>
  379.   ABOUT
  380.     \<< PICT { # 0h
  381. # 0h } BOARD {
  382. # 1Fh # 1Eh }
  383. "BROUGHT TO YOU BY:"
  384. 1 \->GROB REPL {
  385. # 1Fh # 24h }
  386. "DOUGLAS R. CANNON"
  387. 1 \->GROB REPL {
  388. # 23h # 2Ah }
  389. "BYU, PROVO, UTAH"
  390. 1 \->GROB REPL {
  391. # 2Ch # 30h }
  392. "AUGUST 1991" 1
  393. \->GROB REPL { # 0h
  394. # 37h } # 83h # 9h
  395. BLANK REPL { # 3h
  396. # 38h }
  397. "dougc@bert.cs.byu.edu"
  398. 2 \->GROB REPL REPL {
  399. # 0h # 0h } PVIEW
  400.       DO
  401.       UNTIL KEY
  402.       END DROP
  403.     \>>
  404.   SKMAIN
  405.     \<<
  406. [ 0 0 ]
  407. 1 { { # 45h # 1Eh }
  408. { # 45h # 26h } } \->
  409. DEST SK HP SC P C
  410.       \<< PICT { # 0h
  411. # 0h } BOARD
  412.         CASE HP 1
  413. ==
  414.           THEN {
  415. # 32h # 1Eh } "HP"
  416. 2 \->GROB REPL
  417.           END HP 2
  418. ==
  419.           THEN {
  420. # 2Ch # 1Eh }
  421. SHAPES 1 GET GXOR {
  422. # 32h # 26h } "HP"
  423. 2 \->GROB REPL {
  424. # 2Ch # 1Eh }
  425. SHAPES 1 GET GXOR
  426.           END
  427.         END { # 19h
  428. # 38h } DESTIN DEST
  429. 100 / GET REPL REPL
  430.         DO PICT {
  431. # 2Ch # 1Eh }
  432. SHAPES 1 GET GXOR
  433.           IF P HP
  434. ==
  435.           THEN SC
  436. HP SK DEST HPTURN
  437.           ELSE SC P
  438. GET DEST TURN
  439.           END MYTH
  440. DUP SIGN DUP
  441.           IF
  442.           THEN
  443.             IF 0 <
  444.             THEN P
  445. ERNUM
  446.             END SC
  447. P GET + DUP 'SC' P
  448. ROT PUT C P GET
  449. DNUM
  450.           ELSE
  451. DROP2
  452.           END 3
  453. ERNUM 0 { # 45h
  454. # 2Eh } DNUM P 1 ==
  455. 2 1 IFTE 'P' STO
  456.         UNTIL SC 1
  457. GET DEST \>= SC 2 GET
  458. DEST \>= OR P 1 ==
  459. AND SC ARRY\-> DROP \=/
  460. AND
  461.         END DEST SK
  462. HP SC FANF
  463.       \>>
  464.     \>>
  465.   NEWS
  466.     \<< 0 \-> M C A
  467.       \<< 1 M SIZE
  468.         FOR N PICT
  469. C M N N SUB 1 \->GROB
  470. DUP SIZE DROP 'A'
  471. STO REPL 2000 .005
  472. BEEP C 1 GET A +
  473. 'C' 1 ROT PUT
  474.         NEXT
  475.       \>>
  476.     \>>
  477.   DNUM
  478.     \<< \-> N C
  479.       \<< PICT C N 2
  480. \->GROB REPL
  481.       \>>
  482.     \>>
  483.   NANNY
  484.     \<< 554 .3 659 .3
  485. 740 .075 554 .15
  486. 659 .075 659 .15 1
  487. 6
  488.       FOR N BEEP
  489.       NEXT
  490.     \>>
  491.   Roll
  492.     \<< 0 0 \-> D1 D2
  493.       \<< RAND 6 * 1
  494. + IP 'D1' STO RAND
  495. 6 * 1 + IP 'D2' STO
  496. PICT { # 5h # 6h }
  497. DICE D1 GET REPL
  498. 4000 .03 BEEP PICT
  499. { # 6Bh # 6h } DICE
  500. D2 GET REPL 4000
  501. .03 BEEP D1 D2
  502.       \>>
  503.     \>>
  504.   ERNUM
  505.     \<< PICT # 45h
  506. ROT R\->B # 8h *
  507. # 16h + 2 \->LIST
  508. # 19h # 8h BLANK
  509. REPL
  510.     \>>
  511.   TURN
  512.     \<< 0 0 0 0 0 \->
  513. SC DEST POT D1 D2
  514. KY DONE
  515.       \<<
  516.         DO KEY NOT
  517. 0 IFT
  518.         UNTIL NOT
  519.         END
  520.         DO
  521.           DO
  522.           UNTIL KEY
  523.           END 'KY'
  524. STO
  525.           IF KY 35
  526. ==
  527.           THEN QUIT
  528.           END
  529.           IF KY 11
  530. ==
  531.           THEN Roll
  532. 'D2' STO 'D1' STO
  533.             IF D1 1
  534. == D2 1 == AND
  535.             THEN
  536. DEST DSK 1 'DONE'
  537. STO SC NEG
  538.             END
  539.             IF D1 1
  540. == D2 1 == OR DONE
  541. NOT AND
  542.             THEN D1
  543. D2 DEST SK 1 'DONE'
  544. STO 0
  545.             END
  546.             IF DONE
  547. NOT
  548.             THEN
  549. 'POT' D1 D2 + STO+
  550. POT { # 45h # 2Eh }
  551. DNUM
  552.             END
  553.           END
  554.           IF KY 16
  555. \=/ KY 11 \=/ AND
  556.           THEN 200
  557. .1 BEEP
  558.           END
  559.         UNTIL KY 16
  560. == DONE OR
  561.         END DONE
  562. NOT POT IFT
  563.       \>>
  564.     \>>
  565.   HPTURN
  566.     \<< 0 0 0 0 0 \->
  567. SC HP SL DEST KP
  568. POT D1 D2 DONE
  569.       \<<
  570.         CASE SL 1
  571. ==
  572.           THEN 5
  573. 'KP' STO
  574.           END SL 2
  575. ==
  576.           THEN 3
  577. 'KP' STO
  578.           END SL 3
  579. ==
  580.           THEN 1
  581. 'KP' STO
  582.           END
  583.         END
  584.         DO 'KP' 1
  585. STO- Roll 'D2' STO
  586. 'D1' STO
  587.           IF D1 1
  588. == D2 1 == AND
  589.           THEN DEST
  590. DSK 1 'DONE' STO SC
  591. HP GET NEG
  592.           END
  593.           IF D1 1
  594. == D2 1 == OR DONE
  595. NOT AND
  596.           THEN D1
  597. D2 DEST SK 1 'DONE'
  598. STO 0
  599.           END
  600.           IF DONE
  601. NOT
  602.           THEN
  603. 'POT' D1 D2 + STO+
  604. POT { # 45h # 2Eh }
  605. DNUM
  606.           END
  607.           IF SL 3
  608. ==
  609.           THEN SC
  610. HP GET SC HP 1 == 2
  611. 1 IFTE GET > 16 23
  612. IFTE POT \<= 0 1 IFTE
  613. 'KP' STO
  614.           END
  615.           IF SC HP
  616. GET POT + DEST \>=
  617.           THEN 0
  618. 'KP' STO
  619.           END
  620.           IF HP 2
  621. == SC HP 1 == 2 1
  622. IFTE GET SWAP OVER
  623. DEST \>= AND SWAP SC
  624. HP GET POT + \>= AND
  625.           THEN 1
  626. 'KP' STO
  627.           END
  628.         UNTIL KP 0
  629. \<= DONE OR
  630.         END DONE
  631. NOT POT IFT
  632.       \>>
  633.     \>>
  634.   QUIT
  635.     \<< 0 \-> KY
  636.       \<< CLLCD
  637. "Do you REALLY" 2
  638. DISP
  639. "want to quit?" 3
  640. DISP TEXT 1000 .3
  641. BEEP
  642.         DO
  643.           DO
  644.           UNTIL KEY
  645.           END 'KY'
  646. STO
  647.           IF KY 31
  648. \=/ KY 52 \=/ AND
  649.           THEN 200
  650. .1 BEEP
  651.           END
  652.           IF KY 52
  653. ==
  654.           THEN KILL
  655.           END
  656.         UNTIL KY 32
  657. ==
  658.         END { # 0h
  659. # 0h } PVIEW
  660.       \>>
  661.     \>>
  662.   FANF
  663.     \<< 0 1 0 \-> DEST
  664. SK HP SC C WON ME
  665.       \<<
  666.         IF HP 3 \=/
  667.         THEN SC
  668. ARRY\-> DROP > HP 1
  669. == OVER AND SWAP
  670. NOT HP 2 == AND OR
  671.         ELSE 0
  672.         END DUP
  673. 'ME' STO 'HPWON'
  674. 'YOUWON' IFTE 'WON'
  675. STO 0 24
  676.         FOR N PICT
  677. # 1Eh N R\->B 2 \->LIST
  678. 'C' STO C SKSHP
  679. REPL PICT C WON N 2
  680. / 1 + GET REPL 2
  681.         STEP PICT {
  682. # 1Eh # 36h }
  683. SHAPES 6 GET REPL
  684.         IF ME
  685.         THEN NANNY
  686.         ELSE 1 4
  687.           FOR N 1 2
  688.             FOR O
  689. PICT { # 20h # 1Ch
  690. } SHAPES 5 GET GXOR
  691. 10000 .005 BEEP
  692.             NEXT
  693.           NEXT
  694.         END 1 WAIT
  695. PICT { # 1Eh # 3h }
  696. # 47h # 12h BLANK
  697. REPL "FINAL SCORE:"
  698. { # 1Fh # 0h } NEWS
  699.         IF HP 1 ==
  700.         THEN {
  701. # 21h # 6h } "HP: "
  702.         ELSE {
  703. # 1Fh # 6h } "#1: "
  704.         END SC 1
  705. GET \->STR + SWAP
  706. NEWS
  707.         IF HP 2 ==
  708.         THEN {
  709. # 21h # Ch } "HP: "
  710.         ELSE {
  711. # 1Fh # Ch } "#2: "
  712.         END SC 2
  713. GET \->STR + SWAP
  714. NEWS
  715.         IF HP 3 \=/
  716.         THEN
  717. "SKILL: "
  718.           CASE SK 1
  719. ==
  720.             THEN
  721. "EASY"
  722.             END SK
  723. 2 ==
  724.             THEN
  725. "AVERAGE"
  726.             END SK
  727. 3 ==
  728.             THEN
  729. "CHALLENGING"
  730.             END
  731.           END + {
  732. # 1Fh # 12h } NEWS
  733.         END # 1Eh
  734. SC ARRY\-> DROP >
  735. # 5h # Bh IFTE 2
  736. \->LIST 'C' STO
  737.         DO KEY NOT
  738. 0 IFT
  739.         UNTIL NOT
  740.         END
  741.         DO PICT C
  742. SHAPES 7 GET GXOR
  743. .5 WAIT
  744.         UNTIL KEY
  745.         END DROP
  746.       \>>
  747.     \>>
  748.   SK
  749.     \<< 0 \-> D1 D2
  750. DEST C
  751.       \<< PICT {
  752. # 20h # 38h }
  753. SHAPES 3 GET REPL
  754.         IF D1 1 ==
  755.         THEN { # 2h
  756. # 2h }
  757.         ELSE {
  758. # 68h # 2h }
  759.         END 'C' STO
  760. 1 4
  761.         FOR N PICT
  762. C SHAPES 2 GET GXOR
  763. 2000 .01 BEEP
  764.         NEXT PICT {
  765. # 19h # 38h }
  766. DESTIN DEST 100 /
  767. GET REPL
  768.       \>>
  769.     \>>
  770.   DSK
  771.     \<< 1 0 \-> DEST D
  772. C
  773.       \<< PICT {
  774. # 22h # 38h }
  775. SHAPES 4 GET REPL
  776. PICT { # 20h # 2h }
  777. SHAPES 5 GET GXOR 1
  778. 4
  779.         FOR N PICT
  780. # 2h # 66h D * + {
  781. # 2h } + 'C' STO C
  782. SHAPES 2 GET GXOR
  783. 2000 .02 BEEP 'D' 1
  784.           IF D
  785.           THEN STO-
  786.           ELSE STO+
  787.           END PICT
  788. C SHAPES 2 GET GXOR
  789. 1000 .02 BEEP
  790.         NEXT PICT {
  791. # 20h # 2h } SHAPES
  792. 5 GET GXOR PICT {
  793. # 19h # 38h }
  794. DESTIN DEST 100 /
  795. GET REPL
  796.       \>>
  797.     \>>
  798.   MYTH
  799.     \<< RAND 40 * IP
  800.       IF 1 ==
  801.       THEN
  802.         IF RAND 2 *
  803. IP
  804.         THEN 2 3
  805.           FOR N
  806. PICT { # 0h # 1Eh }
  807. PLANT N GET REPL
  808.           NEXT 2 1
  809.           FOR N
  810. PICT { # 0h # 1Eh }
  811. PLANT N GET REPL -1
  812.           STEP
  813.         ELSE 2 3
  814.           FOR N
  815. PICT { # 67h # 1Eh
  816. } POT N GET REPL
  817.           NEXT 2 1
  818.           FOR N
  819. PICT { # 67h # 1Eh
  820. } POT N GET REPL -1
  821.           STEP
  822.         END
  823.       END
  824.     \>>
  825.   BOARD {
  826. "GROB 131 64 0FFFFF10040E70CFCF00E70000CFFFF700CFFFFF700A02404848082400"
  827. "00FFFFFF10E30008F0051A504B4B0CA50008F0000E30E00000E08E2A501B4B0AA50108"
  828. "30000830700000C14F5A582B4B09A5820C10000070700000C1ABB8545A4B8AA5450C10"
  829. "00007030000081D5795ABA4B4BA5AB0C0000006030000089EAE25D5A4BABA0D50C0000"
  830. "00603000008571D5DE2B4BCB22E20C0000006030000089E2A2571B4BEB05610C000000"
  831. "6030000081D5499B4B4B6B8A800C0000006030000081AB88D54B4B2B47500C00000060"
  832. "300E0081471AF24B4B4BAB200C00830060300F10818E2A714B4B6BD5100C00C7006030"
  833. "0F10810D5AF24B4B4BE2200C00C70060300F10812AB8D54B4B4379500C00C70060300E"
  834. "008154799B4B4B4BB8B00C0083006030000089A8E2571B4B4F54710C00000060300000"
  835. "8571D5DE2B4B4F2DE20C0000006030000089EAE25D5A4B4795D50C0000006030000081"
  836. "D5795AB84B4B85AB0C0000006030000081ABB854797B45A5471C00000060300000814F"
  837. "5A58E20B42A58E2C00000060700000C18E2A50D5EB41A50D5C10000070700000C1051A"
  838. "50ABCBC0A50ABC10000070E00000E00A024047184024047930000830E30008F0040E70"
  839. "8ACF00E708A8F0000E30CFFFFF70000000050000000050FFFFFF100FFFFF1000000002"
  840. "0000000020CFFFF700000000000000000000000000000000000000000F10000082480C"
  841. "1000000000FF100000008F3000008268022000000000FF10000000C7300000C7481230"
  842. "00000000EF00000000E120000082483A2000000000EF00000C30F0000000C748162000"
  843. "000000FF10000E7078F00000824802200000000CFF70000F703CF1000082E80C100000"
  844. "0007BDE1008FF83EF3000000080000000000CBD6B7008FF81F8300016D1B0C10000000"
  845. "ED6BDE0081F8930300036DEA0220000000FFFFFF1080CDC101000728FA123000000030"
  846. "000810008DC000000F6D3B3A20000008FFFFFF30878D6C70000728DB1620000008D6D6"
  847. "D630CF9D6FF000036DEB02200000086D6D6D20EFBDEFF000016D0A0C10000008BBBBBB"
  848. "30E33FFFF0000000080000000008D6D6D630E16F70F1000F83F90C100000086D6D6D20"
  849. "ECFFF7C1000154480220000008FFFFFF30CCF0E7810001544812300000003000081048"
  850. "FFF381000154483A20000000FFFFFF1008308380000F44481620000000ED6BDE0000FF"
  851. "F180000144480220000000CBD6B70000E0E000000183480C100000000FBDE100008F30"
  852. "0000000000000000000008FF3000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7000000010"
  853. "00000000000000000040000000F833C0100000000000000000004F83E830FD73C01000"
  854. "00000000000000004FD7FD70BD63C0100000000000000000004BD63C00BD63C0100000"
  855. "000000000000004BD6FC30FD63C0100000000000000000004FD7E970FC63C010000000"
  856. "0000000000004FC78160BD7FD71000000000000000000043C6FD70B93FD71000000000"
  857. "000000000043C6E830"
  858. }
  859.   SKSHP {
  860. "GROB 71 31 0000000000000000000000000000000000000018F10F3F308F100008280"
  861. "1012120A010000458610D2D20B610000AB8614C2D28A614000D7961AC2D24A61A008EE"
  862. "261592D2AA6151047D569EA2D2DA69E20ABAB45792DAEA24710D5475BBC2D2FA88B00A"
  863. "B8A4D5C2DAF24950047156E2D2DAD2A22008E22671D2DAC2D51000D58EB0D2D2DAEA00"
  864. "00AB8E50D2DAD6750000479EB0D2D2DAB800088E2671D2D2DC5610041D56E2D2D2DE2E"
  865. "200A2AB4D5C2D2D71D500D5475BBC2D2DB4BB00ABAB45792D2D56571047D569E22D2D2"
  866. "69E208EE261D5ED25961D500D7961AB0C29861AB00AB861479F258614710458618E2F2"
  867. "38618E20828010D50218010D50018F10A2F308F10A2000000041000000041000000080"
  868. "000000080" }
  869.   DICE {
  870. "{ GROB 19 17 00000000000000000000000000000000000000700008F00008F00008F"
  871. "000007000000000000000000000000000000000000000 GROB 19 17 000830000C700"
  872. "00C70000C70000830000000000000000000000000000000000000000000E00000F1000"
  873. "0F10000F10000E00000 GROB 19 17 000830000C70000C70000C70000830000000007"
  874. "00008F00008F00008F000007000000000E00000F10000F10000F10000E00000 GROB 1"
  875. "9 17 E00830F10C70F10C70F10C70E0083000000000000000000000000000000000000"
  876. "0000000E00830F10C70F10C70F10C70E00830 GROB 19 17 E00830F10C70F10C70F10"
  877. "C70E0083000000000700008F00008F00008F000007000000000E00830F10C70F10C70F"
  878. "10C70E00830 GROB 19 17 E07830F9FC70F9FC70F9FC70E0783000000000000000000"
  879. "0000000000000000000000000E07830F9FC70F9FC70F9FC70E07830 }"
  880. }
  881.   WAVES {
  882. "{ GROB 6 20 70E0C1838383C1E0707070E0C1838383C1E07070 GROB 6 20 E0C1838"
  883. "383C1E0707070E0C1838383C1E0707070 GROB 6 20 C1838383C1E0707070E0C18383"
  884. "83C1E0707070E0 GROB 6 20 838383C1E0707070E0C1838383C1E0707070E0C1 GROB"
  885. " 6 20 8383C1E0707070E0C1838383C1E0707070E0C183 GROB 6 20 83C1E0707070E"
  886. "0C1838383C1E0707070E0C18383 GROB 6 20 C1E0707070E0C1838383C1E0707070E0"
  887. "C1838383 GROB 6 20 E0707070E0C1838383C1E0707070E0C1838383C1 GROB 6 20 "
  888. "707070E0C1838383C1E0707070E0C1838383C1E0 GROB 6 20 7070E0C1838383C1E07"
  889. "07070E0C1838383C1E070 }"
  890. }
  891.   DOTS {
  892. "{ GROB 9 19 C000E100CC000E106C00F0006C000E106C00F0006C000E106C00F0006C"
  893. "000E10CC00E100C000 GROB 9 19 8100C30081006C00FE106C0000006C00FE106C000"
  894. "0006C00FE106C0000006600FF0066000000 GROB 9 19 030087006300F0006C000E10"
  895. "6C00F0006C000E106C00F0006C000E106C00F000630087000300 GROB 9 19 0000660"
  896. "0FF00660000006C00FE106C0000006C00FE106C0000006C00FE106C008100C3008100 "
  897. "}" }
  898.   BALLS {
  899. GROB 7 18 C1E3E3E3C10000C1632263C1C1E3E3E3C100
  900. GROB 7 18 E3E3E3C100000000C16363E3E3E3E3C10000
  901. GROB 7 18 F7E3C1000000000000C163F7F7E3C1000000
  902. GROB 7 18 E3E3E3C100000000C16363E3E3E3E3C10000
  903. GROB 7 18 C1E3E3E3C10000C1632263C1C1E3E3E3C100
  904. GROB 7 18 00C1E3E3E3C1C1632263C10000C1E3E3E3C1
  905. GROB 7 18 0000C1E3E3E3E36363C100000000C1E3E3E3
  906. GROB 7 18 000000C1E3F7F763C1000000000000C1E3F7
  907. GROB 7 18 0000C1E3E3E3E36363C100000000C1E3E3E3
  908. GROB 7 18 00C1E3E3E3C1C1632263C10000C1E3E3E3C1
  909. }
  910.   DESTIN {
  911. "{ GROB 81 8 0000000E0F3E70000000000000000B8255A0000000000000008A8255A0"
  912. "000000000000000A8255A0000000000000000A8255A0000000000000000A8255A00000"
  913. "00000000000A8255A0000000000000008F3F3E7000000000 GROB 81 8 0000000F3E7"
  914. "CF0000000000000008055AA41000000000000000055AA41000000000000000835AA410"
  915. "00000000000000705AA41000000000000008205AA41000000000000008205AA4100000"
  916. "0000000008F7E7CF000000000 GROB 81 8 0000000F3E7CF0000000000000008055AA"
  917. "41000000000000000055AA41000000000000000E35AA41000000000000000055AA4100"
  918. "0000000000000055AA41000000000000008055AA41000000000000000F3E7CF0000000"
  919. "00 }" }
  920.   YOUWON {
  921. GROB 1 1 00
  922. GROB 1 1 00
  923. GROB 1 1 00
  924. GROB 71 2 00000000000300000000C100000003000070
  925. GROB 71 2 C16F9F91E913F9F91363B9FC81B9999FC813
  926. GROB 71 2 6ED0F681BD9D0FED030E703681CED603ED81
  927. GROB 71 2 0C6033C0CED6036F810C6033C0CB76036F81
  928. GROB 71 2 066813E0CB7681668106EC03F0C93EC03600
  929. GROB 71 2 03C70ED1C81C7C1CC0E10000000000000C00
  930. GROB 71 2 000000000000000830000000000000000000
  931. GROB 1 1 00
  932. GROB 1 1 00
  933. GROB 1 1 00 }
  934.   HPWON {
  935. GROB 1 1 00
  936. GROB 71 2 0000000000000000000F7BFFF00000000000
  937. GROB 71 2 0F730EF000000000000F1308F00000000000
  938. GROB 71 2 078100E00003000000078100E00003000070
  939. GROB 71 2 038100C0E913F9F91303C7C7C0B9999FC813
  940. GROB 71 2 01CCCC80BD9D0FED0301CCCC80CED603ED81
  941. GROB 71 2 01666680CED6036F8101666680CB76036F81
  942. GROB 71 2 0366E3C0CB76816681030030C0C93EC03600
  943. GROB 71 2 070030E0C81C7C1CC0070030E00000000C00
  944. GROB 71 2 0F1818F000000008300F781EF00000000000
  945. GROB 71 2 0FFBDFF00000000000000000000000000000
  946. GROB 1 1 00
  947. GROB 1 1 00 }
  948.   PLANT {
  949. "{ GROB 30 24 00000F1000008F300000C7300000E1200C30F0000E7078F00F703CF18"
  950. "FF83EF38FF81F8381F8930380CDC101008DC000878D6C70CF9D6FF0EFBDEFF0E33FFFF"
  951. "0E16F70F1ECFFF7C1CCF0E78148FFF3810830838000FFF18000E0E000008F3000 GROB"
  952. " 30 24 00008F000000CF100000EB100C30F0100E7878F00F783CF18FF81EF38FFC1F8"
  953. "381FC830380CDC101008DC000878D6C70CF9D6FF0EFBDEFF0EFBDEFF0E17FF0F1E06F7"
  954. "0C1CCFFF7814CF0E78108FFF3800830838000FFF10000E0E000008F3000 GROB 30 24"
  955. " 0000C7000000EF000C30FD000E7878F00F783CF18FF81EF38FF81F8381ED170380CD9"
  956. "30100CDD100878DEE70CF9D6FF0EFBDEFF0EFBDEFF0E1FDE0F1E06F70C1C06F70814CF"
  957. "FF7810CF0E78008FFF3800830830000FFF10000E0E000008F3000 }"
  958. }
  959.   POT {
  960. "{ GROB 27 24 00EF300000EF300000CF100000CF100000EF300008FFF0000E6BD3008"
  961. "7BD6F00CBD6BD10EFFFFF3060000030FFFFFF70BDADAD60DADADA5077777770BDADAD6"
  962. "0DADADA50FFFFFF7060000030EFFFFF30CBD6BD1087BD6F000E7BD30000FF7000 GROB"
  963. " 27 24 000000000000000000EF300000EF300000CF100000CF100000EF3000087BF00"
  964. "00FBDE700CBD6BF10EFFFFF3060000030FFFFFF70BDADAD60DADADA5077777770BDADA"
  965. "D60DADADA50FFFFFF7070000070EFFFFF30EBD6BD30C7BD6F100FFFF700 GROB 27 24"
  966. " 0000000000000000000000000000000000EF300000EF300000CF100000CF100000FF7"
  967. "0000EBDE300CBD6BF10EFFFFF3060000030FFFFFF70BDADAD60DADADA5077777770BDA"
  968. "DAD60DADADA50FFFFFF7070000070EFFFFF30CBD6BF100EFFF300 }"
  969. }
  970.   SHAPES {
  971. "{ GROB 18 15 1EFF303EFF307EFF30FEFF307EFF303EFF301EFF300000001EFF303EF"
  972. "F307EFF30FEFF307EFF303EFF301EFF30 GROB 25 25 0FFFF100CFFFF700EFFFFF00E"
  973. "FFFFF00FFFFFF10FFFFFF10FFFFFF10FFFFFF10FFFFFF10FFFFFF10FFFFFF10FFFFFF1"
  974. "0FFFFFF10FFFFFF10FFFFFF10FFFFFF10FFFFFF10FFFFFF10FFFFFF10FFFFFF10FFFFF"
  975. "F10EFFFFF00EFFFFF00CFFFF7000FFFF100 GROB 67 8 E7ECD9B377EEFDF170DFAE49"
  976. "A2557AF5F25050A749A65D3A049250D7A349AE5D1A749250EBA349AE5D1A7492700AA7"
  977. "49AA5D3A049200FBAE4FA2557AF5F270E7EC9F9377EEFDF170 GROB 63 8 F7CFC9BF3"
  978. "70EF937DBA759AE550AF9255AA459A2550A08255AA459AE350A78255AA459AE350A783"
  979. "75AA459A2550A0000DBA75FAE5DFAF937F7CF8F9F3FFEF937 GROB 67 25 040810030"
  980. "3008100000E08100303008100000F18100303008100008B3810120302810100C178183"
  981. "20303818300E0E01C12038380C10070C11E0303C300E000E080170303E3006000C1089"
  982. "30303630200008308D10303230700000708F00303038300000E0870030303C100000C1"
  983. "8F0030303E000000838D103030378100000789303030B38300020E01703030F1070007"
  984. "0C11E03030F01E000E0E01C12030781C100C178183003038183008B381070030181070"
  985. "00F1810E00300810E000E0810C1E300810C1004081083C300810830000000070000000"
  986. "070000000020000000020 GROB 71 1 FFFFFFF9CFFFFFFF94 GROB 71 7 EFFFFFFF1"
  987. "000000004FFFFFFFF339AC23E64FFFFFFFF3292BC2512FFFFFFFF394294A312FFFFFFF"
  988. "F3D29429800FFFFFFFF3B19429901EFFFFFFF1000000000 }"
  989. }
  990. END
  991.  
  992. END_RPL
  993.  
  994.